The present invention relates to data structures. More specifically, the present invention relates to a method for creating an ordered data structure for storing a plurality of data elements.
In a typical data structure, each element includes a data element and a reference, for example, a pointer. Each reference stores an address of a data element of the immediately succeeding element thereby establishing an order among the data elements. Thus, the references are coupled with the respective data elements for maintaining an order between the data elements.
As the data elements and the corresponding references are coupled with each other, restructuring of the ordered data structure, for example, insertion or deletion of the data elements in the data structure, necessitates updating of the corresponding references. This results in a significant increase in the processing time if the ordered data structure contains a computationally heavy data set. Further, corruption or loss of any element in the ordered data structure results in a loss of the reference of the succeeding data element, thus rendering the subsequent elements in the data structure inaccessible.
In light of the above discussion, there is a need for a method and computer program product for creating an ordered data structure that enables de-coupling of the references and the data elements such that restructuring the ordered data structure does not necessitate updating of the corresponding references. Further, the references should have an implicit order such that corruption or loss of an element does not render subsequent elements in the data structure inaccessible.